package com.atguigu.gmall.item.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.item.client.impl.ItemFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 *
 * feign调用item 数据
 * @author zjiajia
 * @date 2021/1/31 10:32
 */

@FeignClient(name = "service-item",fallback = ItemFeignClientFallback.class)
public interface ItemFeignClient {
    /**
     * 商品详情页数据
     * @param skuId skuId
     * @return  详情页数据
     */
    @GetMapping("api/item/{skuId}")
    Result getItem(@PathVariable Long skuId);
}
